#!/usr/bin/env bash
# ******************************************************
# Filename     : chrony_centos8_install.sh
# Last modified: 2022-10-11 12:18
# Version      :
# AppVersion   :
# Author       : jack.zang
# Email        : jack_zang@126.com
# Description  :
# source <(curl -sL https://gitee.com/jack_zang/public-scripts/raw/master/shell/ntp/chrony_centos8_install.sh)
#
# ******************************************************

yum -y install chrony

cat > /etc/chrony.conf <<EOF
pool 2.cn.pool.ntp.org iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 0.0.0.0/0
keyfile /etc/chrony.keys
leapsectz right/UTC
logdir /var/log/chrony
EOF

systemctl restart chronyd && systemctl enable chronyd







